import { EntityModel } from '@midwayjs/orm';
import { Column } from 'typeorm';
import { BaseModel } from '../utils/base.model';

export enum SubsidyStatus {
  PENDING = 'pending',
  SUCCESS = 'success',
}

/**
 * 补贴
 */
@EntityModel()
export class Subsidy extends BaseModel {
  @Column({
    comment: '姓名',
    nullable: true,
  })
  name: string;

  @Column({
    comment: '姓名',
    nullable: true,
  })
  idcard: string;

  @Column({
    comment: '姓名',
    nullable: true,
  })
  mobile: string;

  @Column({
    comment: '姓名',
    nullable: true,
  })
  type: string;

  @Column({
    comment: '姓名',
    nullable: true,
    type: 'float',
  })
  amount: number;

  @Column({
    comment: '状态',
    type: 'enum',
    enum: SubsidyStatus,
    default: SubsidyStatus.PENDING,
  })
  status: SubsidyStatus;
}
